#ifndef _H_BASEPLAYER
#define _H_BASEPLAYER

#include <string>
#include <iostream>
#include <list>

class baseToken;
class effectCard;
class baseCard;
class baseBoard;
class baseDeck;

class basePlayer
{
    private:
        static const int actionsNum = 3;
        std::string name;
        std::string color;
        std::list<baseCard> cardList;
        std::list<baseToken> tokenList;
        baseBoard *board;
        baseDeck *deck;
        int actionsLeft;

    public:
        // Constructor
        basePlayer();
        basePlayer(std::string aName, std::string aColor, baseBoard* aBoard, baseDeck* aDeck);
        basePlayer(std::string aName, std::string aColor, baseBoard* aBoard, int aTokenNum, baseDeck* aDeck);

        // Accessor
        std::string getName();
        std::string getColor();
        std::list<baseCard> getCardList();
        std::list<baseToken> getTokenList();
        int getActionsLeft();
        void setName(std::string aName);

        void addCard(baseCard& aCard);
        void addToken();
        void addTokens(int aTokens);
        void addActions(int aActions);

        // Print
        std::string toString();
        void toString(std::ostream &out);
        void toString(std::string &str);

        // Player managent
        void winCard(baseCard& aCard);
        void discardCard(baseCard& aCard);
        void receiveCard(baseCard& aCard);
        void receiveToken(baseToken& aToken);
        void giveAllActions();
        void display();
        int getScore();

        // Actions
        void useToken(baseCard& aCard);
        void takeToken(baseCard& aCard);
        void cardPlayed(baseCard& aCard);
        void actionDone();

    private:
        std::string cardListToString();
};

#endif //_H_BASEPLAYER